<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../general/header.jsp" %>
		<div id="header">FREE MARKET HOME PAGE</div>
		<%@ include file="../general/menu.jsp" %>		
		<c:if test="${!empty name}">
			Welcome <c:out value="${name}" />!!!!
		</c:if>
		
		<h2>Purchases by Category</h2>
		<table class="listas">
			<tr style="font-weight:bold;"> 
				<td> Category </td>
				<td> Amount </td>
			</tr>
			<c:forEach var="purchase" items="${purchases}">
				<tr>
					<td> <c:out value="${purchase.key}" /> </td> 
					<td> <c:out value="${purchase.value}" /> </td> 
				</tr>
			</c:forEach>
		</table>		
<div id="bottom">
	<span class="inline spaced">
		<a class="color" href="../general/index">Go back to index</a>
	</span>
</div>	
<%@ include file="../general/footer.jsp" %>